function S=set_field(S,field,def_val)
%S = SET_FIELD(S,'field',V) sets the contents of the specified field to a default value if the specified field is not assigned.  
if ~isfield(S,field),
  S=setfield(S,field,def_val);
end;
